﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using KL.Store.Core.Domain;
using TN.Data;

namespace KL.Store.Data
{
    public class dbContact
    {
        #region Insert

        public static void Insert(int UserId, int MemberId)
        {
            SqlHelper.ExecuteNonQuery(dbParameters.dsnStore, "SPR_ESTORE_MemberShip_Insert", new object[] { UserId, MemberId });
        }

        #endregion

        #region Delete

        public static void Delete(int UserId, int MemberId)
        {
            SqlHelper.ExecuteNonQuery(dbParameters.dsnStore, "SPR_ESTORE_MemberShip_Delete", new object[] { UserId, MemberId });
        }

        #endregion

        #region GetList

        public static IList<Contact> GetList(int UserId, string Search)
        {
            IList<Contact> objectList = new List<Contact>();
            SqlHelper.FillList(dbParameters.dsnStore, "SPR_ESTORE_MemberShip_List", objectList, new object[] { UserId, Search });

            return objectList;
        }

        #endregion
    }
}
